﻿@using PartyCraftServer;
@using PartyCraftServer.Web;
@using LibMinecraft.Model;
@using LibMinecraft.Server;
@using System.Web;
@{
    Dictionary<string, string> Navigation = new Dictionary<string, string>();
    Navigation.Add("Dashboard", "/home");
    Navigation.Add("Analytics", "/analytics");
    Navigation.Add("Players", "/players");
    Navigation.Add("Worlds", "/worlds");
    Navigation.Add("Plugins", "/plugins");
    Navigation.Add("Settings", "/settings");
}
<div id="user-info">Welcome, @Model.ViewBag["user"]<a href="/logout">Logout</a></div>
<div class="nav-widget">
    <h3>Navigation</h3>
    <ul id="nav">
    @foreach (var kvp in Navigation)
    {
        var isSelected = kvp.Value.ToLower() == @Model.Url.ToLower() ? "selected" : "";
        <li class="@isSelected"><a href="@kvp.Value">@kvp.Key</a></li>
    }
    </ul>
</div>
<div class="nav-widget" id="chat-wrapper">
    <h3>Chat</h3>
    <script src="/js/chat.js" type="text/javascript"></script>
    <div id="chat">
        @foreach (string message in PartyCraft.GetLastFifteenMessages())
        {
            var text = message;
            text = @WebService.ColorCodeHtml(text);
            @text;
            <br />
        }
    </div>
    <form id="chat-form">
        <input class="text-box" type="text" type="text" placeholder="Chat:" id="chat-send-text" />
        <input type="button" class="float-left" value="Send" id="chat-send-button" />
        <input type="hidden" value="@Model.ViewBag["user"]" id="logged-in-user" />
    </form>
</div>